<html>
<head><meta charset="utf-8"><title>fine-tuning optimizations · t-compiler/wg-rustc-dev-guide · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/index.html">t-compiler/wg-rustc-dev-guide</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html">fine-tuning optimizations</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228617409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617409">(Mar 03 2021 at 16:03)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html#fine-tuning-optimizations">https://rustc-dev-guide.rust-lang.org/building/suggested.html#fine-tuning-optimizations</a></p>



<a name="228617477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617477">(Mar 03 2021 at 16:04)</a>:</h4>
<p>I'm not sure if this is a great suggestion</p>



<a name="228617587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617587">(Mar 03 2021 at 16:04)</a>:</h4>
<p>can someone explain a bit maybe? or tell if you use that what's the advantage?</p>



<a name="228617743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617743">(Mar 03 2021 at 16:05)</a>:</h4>
<p>I meant it will probably compile faster but also probably run slower</p>



<a name="228617846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617846">(Mar 03 2021 at 16:06)</a>:</h4>
<p>I think you might not need to run it all that much</p>



<a name="228617956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617956">(Mar 03 2021 at 16:06)</a>:</h4>
<p>what did you mean exactly?</p>



<a name="228617966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228617966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228617966">(Mar 03 2021 at 16:06)</a>:</h4>
<p>If you don't need to run the whole test suite you will probably gain time overall</p>



<a name="228618014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618014">(Mar 03 2021 at 16:07)</a>:</h4>
<p>right</p>



<a name="228618060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618060">(Mar 03 2021 at 16:07)</a>:</h4>
<p>but suggesting that as a general tip I'm not sure if it's a good idea though</p>



<a name="228618070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618070">(Mar 03 2021 at 16:07)</a>:</h4>
<p>I'm not using that often though, so I'm not sure</p>



<a name="228618075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618075">(Mar 03 2021 at 16:07)</a>:</h4>
<p>maybe we can mention something like that?</p>



<a name="228618127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618127">(Mar 03 2021 at 16:08)</a>:</h4>
<p>I even wonder if it worth doing that</p>



<a name="228618187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618187">(Mar 03 2021 at 16:08)</a>:</h4>
<p>how much faster it really compiles?</p>



<a name="228618306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618306">(Mar 03 2021 at 16:08)</a>:</h4>
<p>at the very least I'd add a note to that guide section explaining a bit all this stuff</p>



<a name="228618467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228618467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228618467">(Mar 03 2021 at 16:09)</a>:</h4>
<p>Yeah I agree it could be worded better</p>



<a name="228619154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228619154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228619154">(Mar 03 2021 at 16:13)</a>:</h4>
<p>I think this is not a great suggestion, yeah. If you turn on incremental it will have a much bigger impact without giving up that much performance.</p>



<a name="228619278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228619278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228619278">(Mar 03 2021 at 16:14)</a>:</h4>
<p>also <a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html#incremental-builds-with---keep-stage">https://rustc-dev-guide.rust-lang.org/building/suggested.html#incremental-builds-with---keep-stage</a> should be updated to suggested <code>--keep-stage-std</code></p>



<a name="228637948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228637948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228637948">(Mar 03 2021 at 18:04)</a>:</h4>
<p>Hmm, I've never heard this advice before. I heard at some point (maybe from <span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> or elsewhere in the guide) that turning off optimizations for the compiler can break stuff?</p>



<a name="228638082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning%20optimizations/near/228638082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/fine-tuning.20optimizations.html#228638082">(Mar 03 2021 at 18:04)</a>:</h4>
<p>Actually I heard it from <code>config.toml.example</code>:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="c1"># Whether or not to optimize the compiler and standard library.</span>
<span class="c1"># WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,</span>
<span class="c1"># building without optimizations takes much longer than optimizing. Further, some platforms</span>
<span class="c1"># fail to build without this optimization (c.f. #65352).</span>
<span class="c1">#optimize = true</span>
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>